package net.sxnic.workflow.pd.action;

import net.sxinfo.core.dao.Page;
import net.sxinfo.core.dao.hibernate3.HibernateCriteria;
import net.sxinfo.core.util.WebUtils;
import net.sxnic.workflow.pd.Pd;
import net.sxnic.workflow.pd.PdManager;

import org.apache.commons.lang3.StringUtils;
import org.hibernate.criterion.Criterion;
import org.hibernate.criterion.Restrictions;
import org.springframework.beans.factory.annotation.Autowired;

@SuppressWarnings("serial")
public class Browse extends PdAction {

	private Page datas;

	@Autowired
	private PdManager pdManager;

	public String execute() throws Exception {

		int pageNumber = WebUtils.getPageNumber(request);
		int pageSize = WebUtils.getPageSize(request);

		datas = beanManager.getPage(pageNumber, pageSize, "pdVersion", true);

		return SUCCESS;
	}

	public Page getDatas() {
		return datas;
	}

	public void setDatas(Page datas) {
		this.datas = datas;
	}
}
